
public class Yy {
	public static void main(String[] args) {
		int [] arr= {21, 5,94,1,33};
		for (int i = 0; i < name(arr).length; i++) {
			System.out.println(name(arr)[i]);
		}
	}
	public static int[] name(int []arr) {
		int max=arr[0];
		int min=arr[0];
		for (int i = 0; i < arr.length; i++) {
			if(max<arr[i]) {
				max=arr[i];
			}
			if (min>arr[i]) {
				min=arr[i];
			}
		}
		int [] a= {max,min};
		return a;
	}
}
